# -*- coding: utf-8 -*-
# @Time : 2018/12/4 12:37
# @Author : chen
# @Site :
# @File : ceshi.py
# @Software: PyCharm

# from decorate.time_util import timer
#
# import time
#
# @timer
# def ceshi(name=5, name2=6):
#     print(name, name2)
#     time.sleep(5)
#     print(100)
#
# ceshi()

# http://127.0.0.1:8000/app/get_score/?imei=869466030690633&startDate=1541754922&endDate=1541754922&output_flag=

import tzlocal

from datetime import datetime


def timestamp_datetime(posix_time):
    unix_timestamp = float(posix_time)
    local_timezone = tzlocal.get_localzone()
    return datetime.fromtimestamp(unix_timestamp, local_timezone)


start_date = timestamp_datetime("1541754922")
start_date = start_date.strftime('%Y%m%d')
pass
